Dynomotion

Group: DynoMotion Message: 5647 From: rdabs54 Date: 9/9/2012
Subject: opto inputs inop with mach
Greetings. I'm trying to finish setting up Kflop and Kanalog with Mach. I asked this question once before, but got on to other projects. This is a little more specific.
Build 427
What works: Three Geckos properly drive servos on a Bridgeport, three axis, CL with glass scales. (more on that in a different post). MUX bit set so step/dir goes to JP4 and 6, and placed at the beginning of the code. I can jog from Mach or Kmotion, with exceptions below.
Before loading C file, Kanalog reads the switches on opto in 142 and 143 fine. After loading C file, but before enabling axis (done manually, axis enable remarked out), kanalog continues to read opto state as well as mach (input config set at port 2, pin 14 and 15). When axis enabled, switch indication ceases on Mach and Kanalog. Also, Axis (1) will estop within a few hundred steps. Sometimes impossible to reset unless I run a step/response check (works fine). Then I can reset. I changed the estop bit in mach to 30 (unused), then it works fine, though no switch is yet connected to 30.
The C file is pretty much what is supplied as an example, with only the parameters changed for the step/dir operation.
I tried several iteration of the code, but setting MUX bit always kills opto inputs, and lets step/dir work. I really want to use the opto inputs on the board so I don't have to build another opto interface.
I'm using Mach 3.043.022, Windows 7 professional, no bloatware. Mach and Kmotion reinstalled twice. Kflop/Kanalog powered by good quality 5V 2A linear supply.
I'm stuck. Help, Please.

Thanks in Advance,

rick
Group: DynoMotion Message: 5648 From: Tom Kerekes Date: 9/10/2012
Subject: Re: opto inputs inop with mach
Hi Rick,
 
I'm not sure I follow all that.  Maybe you might post your files.  If anything configures the Step/Dir generators or IO on JP7 then Kanalog will probably stop functioning.  Does the charge pump LED on Kanalog go off when you enable the axis?
 
 
Regards
TK

Group: DynoMotion Message: 5649 From: rdabs54 Date: 9/10/2012
Subject: Re: opto inputs inop with mach
Apologies for the unintelligible question. Basically I am asking if the Kanalog opto I/O's are still useable with Mach3 when the MUX bit is set to send the step/dir 0 through 3 to JP4 and JP6 to run my Geckodrives. Mach "sees" them until I enable the axis. I'll expand on the question based on your answer. Attached is the test C program I am using.
Thanks for the help.

Rick

#include "KMotionDef.h"

// Defines axis 0 and 1 as simple steppers
// enables them
// sets them as an xy coordinate system for GCode

int main()
{
FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x40;

ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=CL_STEP_DIR_MODE;
ch0->Vel=66000;
ch0->Accel=15259;
ch0->Jerk=6.6e+006;
ch0->P=0;
ch0->I=0;
ch0->D=0;
ch0->FFAccel=0;
ch0->FFVel=0;
ch0->MaxI=200;
ch0->MaxErr=200;
ch0->MaxOutput=200;
ch0->DeadBandGain=1;
ch0->DeadBandRange=0;
ch0->InputChan0=0;
ch0->InputChan1=1;
ch0->OutputChan0=0;
ch0->OutputChan1=1;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x8f0024;
ch0->InputGain0=-3;
ch0->InputGain1=1;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
ch0->OutputGain=-1;
ch0->OutputOffset=0;
ch0->SlaveGain=1;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=0;
ch0->BacklashRate=0;
ch0->invDistPerCycle=1;
ch0->Lead=0;
ch0->MaxFollowingError=1000000000;
ch0->StepperAmplitude=250;

ch0->iir[0].B0=1;
ch0->iir[0].B1=0;
ch0->iir[0].B2=0;
ch0->iir[0].A1=0;
ch0->iir[0].A2=0;

ch0->iir[1].B0=1;
ch0->iir[1].B1=0;
ch0->iir[1].B2=0;
ch0->iir[1].A1=0;
ch0->iir[1].A2=0;

ch0->iir[2].B0=1;
ch0->iir[2].B1=0;
ch0->iir[2].B2=0;
ch0->iir[2].A1=0;
ch0->iir[2].A2=0;

/*ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=STEP_DIR_MODE;
ch0->Vel= 66000.000000;
ch0->Accel=660000.000000;
ch0->Jerk=6600000.000000;
ch0->P=1.000000;
ch0->I=0.000000;
ch0->D=0.000000;
ch0->FFAccel=0.000000;
ch0->FFVel=0.000000;
ch0->MaxI=200.000000;
ch0->MaxErr=200.000000;
ch0->MaxOutput=200.000000;
ch0->DeadBandGain=1.000000;
ch0->DeadBandRange=0.000000;
ch0->InputChan0=0;
ch0->InputChan1=1;
ch0->OutputChan0=0;
ch0->OutputChan1=1;
ch0->LimitSwitchOptions=0x0;
ch0->InputGain0=1.000000;
ch0->InputGain1=1.000000;
ch0->InputOffset0=0.000000;
ch0->InputOffset1=0.000000;
ch0->invDistPerCycle=1.000000;
ch0->Lead=0.000000;
ch0->MaxFollowingError=1000000000.000000;
ch0->StepperAmplitude=250.000000;

ch0->iir[0].B0=1.000000;
ch0->iir[0].B1=0.000000;
ch0->iir[0].B2=0.000000;
ch0->iir[0].A1=0.000000;
ch0->iir[0].A2=0.000000;

ch0->iir[1].B0=1.000000;
ch0->iir[1].B1=0.000000;
ch0->iir[1].B2=0.000000;
ch0->iir[1].A1=0.000000;
ch0->iir[1].A2=0.000000;

ch0->iir[2].B0=1.000000;
ch0->iir[2].B1=0.000000;
ch0->iir[2].B2=0.000000;
ch0->iir[2].A1=0.000000;
ch0->iir[2].A2=0.000000;
EnableAxisDest(0,0);*/

ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=CL_STEP_DIR_MODE;
ch1->Vel=66000;
ch1->Accel=15259;
ch1->Jerk=6.6e+006;
ch1->P=0;
ch1->I=0;
ch1->D=0;
ch1->FFAccel=0;
ch1->FFVel=0;
ch1->MaxI=200;
ch1->MaxErr=20000;
ch1->MaxOutput=200;
ch1->DeadBandGain=1;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=2;
ch1->OutputChan0=1;
ch1->OutputChan1=1;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x0;
ch1->InputGain0=3;
ch1->InputGain1=1;
ch1->InputOffset0=0;
ch1->InputOffset1=0;
ch1->OutputGain=1;
ch1->OutputOffset=0;
ch1->SlaveGain=1;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch1->invDistPerCycle=1;
ch1->Lead=0;
ch1->MaxFollowingError=1000000000;
ch1->StepperAmplitude=250;

ch1->iir[0].B0=1;
ch1->iir[0].B1=0;
ch1->iir[0].B2=0;
ch1->iir[0].A1=0;
ch1->iir[0].A2=0;

ch1->iir[1].B0=1;
ch1->iir[1].B1=0;
ch1->iir[1].B2=0;
ch1->iir[1].A1=0;
ch1->iir[1].A2=0;

ch1->iir[2].B0=1;
ch1->iir[2].B1=0;
ch1->iir[2].B2=0;
ch1->iir[2].A1=0;
ch1->iir[2].A2=0;


/*ch1->InputMode=ENCODER_MODE;
ch1->OutputMode=CL_STEP_DIR_MODE;
ch1->Vel=100.000000;
ch1->Accel=1000.000000;
ch1->Jerk=10000.000000;
ch1->P=0.000000;
ch1->I=0.000000;
ch1->D=0.000000;
ch1->FFAccel=0.000000;
ch1->FFVel=0.000000;
ch1->MaxI=200.000000;
ch1->MaxErr=200.000000;
ch1->MaxOutput=200.000000;
ch1->DeadBandGain=1.000000;
ch1->DeadBandRange=0.000000;
ch1->InputChan0=1;
ch1->InputChan1=2;
ch1->OutputChan0=2;
ch1->OutputChan1=3;
ch1->LimitSwitchOptions=0x0;
ch1->InputGain0=1.000000;
ch1->InputGain1=1.000000;
ch1->InputOffset0=0.000000;
ch1->InputOffset1=0.000000;
ch1->invDistPerCycle=1.000000;
ch1->Lead=0.000000;
ch1->MaxFollowingError=1000000000.000000;
ch1->StepperAmplitude=250.000000;

ch1->iir[0].B0=1.000000;
ch1->iir[0].B1=0.000000;
ch1->iir[0].B2=0.000000;
ch1->iir[0].A1=0.000000;
ch1->iir[0].A2=0.000000;

ch1->iir[1].B0=1.000000;
ch1->iir[1].B1=0.000000;
ch1->iir[1].B2=0.000000;
ch1->iir[1].A1=0.000000;
ch1->iir[1].A2=0.000000;

ch1->iir[2].B0=1.000000;
ch1->iir[2].B1=0.000000;
ch1->iir[2].B2=0.000000;
ch1->iir[2].A1=0.000000;
ch1->iir[2].A2=0.000000;*/
EnableAxisDest(1,0);

ch2->InputMode=ENCODER_MODE;
ch2->OutputMode=CL_STEP_DIR_MODE;
ch2->Vel=4000;
ch2->Accel=4000;
ch2->Jerk=4e+006;
ch2->P=0;
ch2->I=0;
ch2->D=0;
ch2->FFAccel=0;
ch2->FFVel=0;
ch2->MaxI=200;
ch2->MaxErr=1e+006;
ch2->MaxOutput=200;
ch2->DeadBandGain=1;
ch2->DeadBandRange=0;
ch2->InputChan0=2;
ch2->InputChan1=0;
ch2->OutputChan0=2;
ch2->OutputChan1=0;
ch2->MasterAxis=-1;
ch2->LimitSwitchOptions=0x0;
ch2->InputGain0=-1;
ch2->InputGain1=1;
ch2->InputOffset0=0;
ch2->InputOffset1=0;
ch2->OutputGain=-1;
ch2->OutputOffset=0;
ch2->SlaveGain=1;
ch2->BacklashMode=BACKLASH_OFF;
ch2->BacklashAmount=0;
ch2->BacklashRate=0;
ch2->invDistPerCycle=1;
ch2->Lead=0;
ch2->MaxFollowingError=1000000000;
ch2->StepperAmplitude=20;

ch2->iir[0].B0=1;
ch2->iir[0].B1=0;
ch2->iir[0].B2=0;
ch2->iir[0].A1=0;
ch2->iir[0].A2=0;

ch2->iir[1].B0=1;
ch2->iir[1].B1=0;
ch2->iir[1].B2=0;
ch2->iir[1].A1=0;
ch2->iir[1].A2=0;

ch2->iir[2].B0=0.000769;
ch2->iir[2].B1=0.001538;
ch2->iir[2].B2=0.000769;
ch2->iir[2].A1=1.92081;
ch2->iir[2].A2=-0.923885;


/*ch2->InputMode=ENCODER_MODE;
ch2->OutputMode=MICROSTEP_MODE;
ch2->Vel=100.000000;
ch2->Accel=1000.000000;
ch2->Jerk=10000.000000;
ch2->P=1.000000;
ch2->I=0.000000;
ch2->D=0.000000;
ch2->FFAccel=0.000000;
ch2->FFVel=0.000000;
ch2->MaxI=200.000000;
ch2->MaxErr=200.000000;
ch2->MaxOutput=200.000000;
ch2->DeadBandGain=1.000000;
ch2->DeadBandRange=0.000000;
ch2->InputChan0=2;
ch2->InputChan1=3;
ch2->OutputChan0=4;
ch2->OutputChan1=5;
ch2->LimitSwitchOptions=0x0;
ch2->InputGain0=1.000000;
ch2->InputGain1=1.000000;
ch2->InputOffset0=0.000000;
ch2->InputOffset1=0.000000;
ch2->invDistPerCycle=1.000000;
ch2->Lead=0.000000;
ch2->MaxFollowingError=1000000000.000000;
ch2->StepperAmplitude=250.000000;

ch2->iir[0].B0=1.000000;
ch2->iir[0].B1=0.000000;
ch2->iir[0].B2=0.000000;
ch2->iir[0].A1=0.000000;
ch2->iir[0].A2=0.000000;

ch2->iir[1].B0=1.000000;
ch2->iir[1].B1=0.000000;
ch2->iir[1].B2=0.000000;
ch2->iir[1].A1=0.000000;
ch2->iir[1].A2=0.000000;

ch2->iir[2].B0=1.000000;
ch2->iir[2].B1=0.000000;
ch2->iir[2].B2=0.000000;
ch2->iir[2].A1=0.000000;
ch2->iir[2].A2=0.000000;*/

EnableAxisDest(2,0);

DefineCoordSystem(0,1,2,-1);

return 0;

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Rick,
>  
> I'm not sure I follow all that.  Maybe you might post your files.  If anything configures the Step/Dir generators or IO on JP7 then Kanalog will probably stop functioning.  Does the charge pump LED on Kanalog go off when you enable the axis?
>  
>  
> Regards
> TK
>
> From: rdabs54 <rdabney@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, September 9, 2012 6:45 PM
> Subject: [DynoMotion] opto inputs inop with mach
>
>
>  
> Greetings. I'm trying to finish setting up Kflop and Kanalog with Mach. I asked this question once before, but got on to other projects. This is a little more specific.
> Build 427
> What works: Three Geckos properly drive servos on a Bridgeport, three axis, CL with glass scales. (more on that in a different post). MUX bit set so step/dir goes to JP4 and 6, and placed at the beginning of the code. I can jog from Mach or Kmotion, with exceptions below.
> Before loading C file, Kanalog reads the switches on opto in 142 and 143 fine. After loading C file, but before enabling axis (done manually, axis enable remarked out), kanalog continues to read opto state as well as mach (input config set at port 2, pin 14 and 15). When axis enabled, switch indication ceases on Mach and Kanalog. Also, Axis (1) will estop within a few hundred steps. Sometimes impossible to reset unless I run a step/response check (works fine). Then I can reset. I changed the estop bit in mach to 30 (unused), then it works fine, though no switch is yet connected to 30.
> The C file is pretty much what is supplied as an example, with only the parameters changed for the step/dir operation.
> I tried several iteration of the code, but setting MUX bit always kills opto inputs, and lets step/dir work. I really want to use the opto inputs on the board so I don't have to build another opto interface.
> I'm using Mach 3.043.022, Windows 7 professional, no bloatware. Mach and Kmotion reinstalled twice. Kflop/Kanalog powered by good quality 5V 2A linear supply.
> I'm stuck. Help, Please.
>
> Thanks in Advance,
>
> rick
>
Group: DynoMotion Message: 5650 From: Tom Kerekes Date: 9/11/2012
Subject: Re: opto inputs inop with mach
Hi Rick,
 
No Problem I'm just trying to undersatnd.
 
Yes the Kanalog IOs should still be usable with Step/Dir coming out JP4 anf JP6.
 
regards
TK

Group: DynoMotion Message: 5651 From: rdabs54 Date: 9/11/2012
Subject: Re: opto inputs inop with mach
Hi Tom,

My follow up question: When I upload the program below with the exception of enabling the axis, mach and Kanalog digital I/O screen sees the switches I have wired into opto 6 and 7 (bit 142 and 143). The state of the switches are accurately noted on the appropriate screens. (Mach ports and pins set to port 2, pin 14 and 15, per Dynomotion manual). As soon as I enable the axis, either within the program or from dynomotion axis enable axis menu, they no longer read input state. The axis will jog and run.
Thanks for your effort to help me.

Rick

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Rick,
>  
> No Problem I'm just trying to undersatnd.
>  
> Yes the Kanalog IOs should still be usable with Step/Dir coming out JP4 anf JP6.
>  
> regards
> TK
>
> From: rdabs54 <rdabney@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, September 10, 2012 8:43 PM
> Subject: [DynoMotion] Re: opto inputs inop with mach
>
>
>  
> Apologies for the unintelligible question. Basically I am asking if the Kanalog opto I/O's are still useable with Mach3 when the MUX bit is set to send the step/dir 0 through 3 to JP4 and JP6 to run my Geckodrives. Mach "sees" them until I enable the axis. I'll expand on the question based on your answer. Attached is the test C program I am using.
> Thanks for the help.
>
> Rick
>
> #include "KMotionDef.h"
>
> // Defines axis 0 and 1 as simple steppers
> // enables them
> // sets them as an xy coordinate system for GCode
>
> int main()
> {
> FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x40;
>
> ch0->InputMode=ENCODER_MODE;
> ch0->OutputMode=CL_STEP_DIR_MODE;
> ch0->Vel=66000;
> ch0->Accel=15259;
> ch0->Jerk=6.6e+006;
> ch0->P=0;
> ch0->I=0;
> ch0->D=0;
> ch0->FFAccel=0;
> ch0->FFVel=0;
> ch0->MaxI=200;
> ch0->MaxErr=200;
> ch0->MaxOutput=200;
> ch0->DeadBandGain=1;
> ch0->DeadBandRange=0;
> ch0->InputChan0=0;
> ch0->InputChan1=1;
> ch0->OutputChan0=0;
> ch0->OutputChan1=1;
> ch0->MasterAxis=-1;
> ch0->LimitSwitchOptions=0x8f0024;
> ch0->InputGain0=-3;
> ch0->InputGain1=1;
> ch0->InputOffset0=0;
> ch0->InputOffset1=0;
> ch0->OutputGain=-1;
> ch0->OutputOffset=0;
> ch0->SlaveGain=1;
> ch0->BacklashMode=BACKLASH_OFF;
> ch0->BacklashAmount=0;
> ch0->BacklashRate=0;
> ch0->invDistPerCycle=1;
> ch0->Lead=0;
> ch0->MaxFollowingError=1000000000;
> ch0->StepperAmplitude=250;
>
> ch0->iir[0].B0=1;
> ch0->iir[0].B1=0;
> ch0->iir[0].B2=0;
> ch0->iir[0].A1=0;
> ch0->iir[0].A2=0;
>
> ch0->iir[1].B0=1;
> ch0->iir[1].B1=0;
> ch0->iir[1].B2=0;
> ch0->iir[1].A1=0;
> ch0->iir[1].A2=0;
>
> ch0->iir[2].B0=1;
> ch0->iir[2].B1=0;
> ch0->iir[2].B2=0;
> ch0->iir[2].A1=0;
> ch0->iir[2].A2=0;
>
> /*ch0->InputMode=ENCODER_MODE;
> ch0->OutputMode=STEP_DIR_MODE;
> ch0->Vel= 66000.000000;
> ch0->Accel=660000.000000;
> ch0->Jerk=6600000.000000;
> ch0->P=1.000000;
> ch0->I=0.000000;
> ch0->D=0.000000;
> ch0->FFAccel=0.000000;
> ch0->FFVel=0.000000;
> ch0->MaxI=200.000000;
> ch0->MaxErr=200.000000;
> ch0->MaxOutput=200.000000;
> ch0->DeadBandGain=1.000000;
> ch0->DeadBandRange=0.000000;
> ch0->InputChan0=0;
> ch0->InputChan1=1;
> ch0->OutputChan0=0;
> ch0->OutputChan1=1;
> ch0->LimitSwitchOptions=0x0;
> ch0->InputGain0=1.000000;
> ch0->InputGain1=1.000000;
> ch0->InputOffset0=0.000000;
> ch0->InputOffset1=0.000000;
> ch0->invDistPerCycle=1.000000;
> ch0->Lead=0.000000;
> ch0->MaxFollowingError=1000000000.000000;
> ch0->StepperAmplitude=250.000000;
>
> ch0->iir[0].B0=1.000000;
> ch0->iir[0].B1=0.000000;
> ch0->iir[0].B2=0.000000;
> ch0->iir[0].A1=0.000000;
> ch0->iir[0].A2=0.000000;
>
> ch0->iir[1].B0=1.000000;
> ch0->iir[1].B1=0.000000;
> ch0->iir[1].B2=0.000000;
> ch0->iir[1].A1=0.000000;
> ch0->iir[1].A2=0.000000;
>
> ch0->iir[2].B0=1.000000;
> ch0->iir[2].B1=0.000000;
> ch0->iir[2].B2=0.000000;
> ch0->iir[2].A1=0.000000;
> ch0->iir[2].A2=0.000000;
> EnableAxisDest(0,0);*/
>
> ch1->InputMode=ENCODER_MODE;
> ch1->OutputMode=CL_STEP_DIR_MODE;
> ch1->Vel=66000;
> ch1->Accel=15259;
> ch1->Jerk=6.6e+006;
> ch1->P=0;
> ch1->I=0;
> ch1->D=0;
> ch1->FFAccel=0;
> ch1->FFVel=0;
> ch1->MaxI=200;
> ch1->MaxErr=20000;
> ch1->MaxOutput=200;
> ch1->DeadBandGain=1;
> ch1->DeadBandRange=0;
> ch1->InputChan0=1;
> ch1->InputChan1=2;
> ch1->OutputChan0=1;
> ch1->OutputChan1=1;
> ch1->MasterAxis=-1;
> ch1->LimitSwitchOptions=0x0;
> ch1->InputGain0=3;
> ch1->InputGain1=1;
> ch1->InputOffset0=0;
> ch1->InputOffset1=0;
> ch1->OutputGain=1;
> ch1->OutputOffset=0;
> ch1->SlaveGain=1;
> ch1->BacklashMode=BACKLASH_OFF;
> ch1->BacklashAmount=0;
> ch1->BacklashRate=0;
> ch1->invDistPerCycle=1;
> ch1->Lead=0;
> ch1->MaxFollowingError=1000000000;
> ch1->StepperAmplitude=250;
>
> ch1->iir[0].B0=1;
> ch1->iir[0].B1=0;
> ch1->iir[0].B2=0;
> ch1->iir[0].A1=0;
> ch1->iir[0].A2=0;
>
> ch1->iir[1].B0=1;
> ch1->iir[1].B1=0;
> ch1->iir[1].B2=0;
> ch1->iir[1].A1=0;
> ch1->iir[1].A2=0;
>
> ch1->iir[2].B0=1;
> ch1->iir[2].B1=0;
> ch1->iir[2].B2=0;
> ch1->iir[2].A1=0;
> ch1->iir[2].A2=0;
>
> /*ch1->InputMode=ENCODER_MODE;
> ch1->OutputMode=CL_STEP_DIR_MODE;
> ch1->Vel=100.000000;
> ch1->Accel=1000.000000;
> ch1->Jerk=10000.000000;
> ch1->P=0.000000;
> ch1->I=0.000000;
> ch1->D=0.000000;
> ch1->FFAccel=0.000000;
> ch1->FFVel=0.000000;
> ch1->MaxI=200.000000;
> ch1->MaxErr=200.000000;
> ch1->MaxOutput=200.000000;
> ch1->DeadBandGain=1.000000;
> ch1->DeadBandRange=0.000000;
> ch1->InputChan0=1;
> ch1->InputChan1=2;
> ch1->OutputChan0=2;
> ch1->OutputChan1=3;
> ch1->LimitSwitchOptions=0x0;
> ch1->InputGain0=1.000000;
> ch1->InputGain1=1.000000;
> ch1->InputOffset0=0.000000;
> ch1->InputOffset1=0.000000;
> ch1->invDistPerCycle=1.000000;
> ch1->Lead=0.000000;
> ch1->MaxFollowingError=1000000000.000000;
> ch1->StepperAmplitude=250.000000;
>
> ch1->iir[0].B0=1.000000;
> ch1->iir[0].B1=0.000000;
> ch1->iir[0].B2=0.000000;
> ch1->iir[0].A1=0.000000;
> ch1->iir[0].A2=0.000000;
>
> ch1->iir[1].B0=1.000000;
> ch1->iir[1].B1=0.000000;
> ch1->iir[1].B2=0.000000;
> ch1->iir[1].A1=0.000000;
> ch1->iir[1].A2=0.000000;
>
> ch1->iir[2].B0=1.000000;
> ch1->iir[2].B1=0.000000;
> ch1->iir[2].B2=0.000000;
> ch1->iir[2].A1=0.000000;
> ch1->iir[2].A2=0.000000;*/
> EnableAxisDest(1,0);
>
> ch2->InputMode=ENCODER_MODE;
> ch2->OutputMode=CL_STEP_DIR_MODE;
> ch2->Vel=4000;
> ch2->Accel=4000;
> ch2->Jerk=4e+006;
> ch2->P=0;
> ch2->I=0;
> ch2->D=0;
> ch2->FFAccel=0;
> ch2->FFVel=0;
> ch2->MaxI=200;
> ch2->MaxErr=1e+006;
> ch2->MaxOutput=200;
> ch2->DeadBandGain=1;
> ch2->DeadBandRange=0;
> ch2->InputChan0=2;
> ch2->InputChan1=0;
> ch2->OutputChan0=2;
> ch2->OutputChan1=0;
> ch2->MasterAxis=-1;
> ch2->LimitSwitchOptions=0x0;
> ch2->InputGain0=-1;
> ch2->InputGain1=1;
> ch2->InputOffset0=0;
> ch2->InputOffset1=0;
> ch2->OutputGain=-1;
> ch2->OutputOffset=0;
> ch2->SlaveGain=1;
> ch2->BacklashMode=BACKLASH_OFF;
> ch2->BacklashAmount=0;
> ch2->BacklashRate=0;
> ch2->invDistPerCycle=1;
> ch2->Lead=0;
> ch2->MaxFollowingError=1000000000;
> ch2->StepperAmplitude=20;
>
> ch2->iir[0].B0=1;
> ch2->iir[0].B1=0;
> ch2->iir[0].B2=0;
> ch2->iir[0].A1=0;
> ch2->iir[0].A2=0;
>
> ch2->iir[1].B0=1;
> ch2->iir[1].B1=0;
> ch2->iir[1].B2=0;
> ch2->iir[1].A1=0;
> ch2->iir[1].A2=0;
>
> ch2->iir[2].B0=0.000769;
> ch2->iir[2].B1=0.001538;
> ch2->iir[2].B2=0.000769;
> ch2->iir[2].A1=1.92081;
> ch2->iir[2].A2=-0.923885;
>
>
> /*ch2->InputMode=ENCODER_MODE;
> ch2->OutputMode=MICROSTEP_MODE;
> ch2->Vel=100.000000;
> ch2->Accel=1000.000000;
> ch2->Jerk=10000.000000;
> ch2->P=1.000000;
> ch2->I=0.000000;
> ch2->D=0.000000;
> ch2->FFAccel=0.000000;
> ch2->FFVel=0.000000;
> ch2->MaxI=200.000000;
> ch2->MaxErr=200.000000;
> ch2->MaxOutput=200.000000;
> ch2->DeadBandGain=1.000000;
> ch2->DeadBandRange=0.000000;
> ch2->InputChan0=2;
> ch2->InputChan1=3;
> ch2->OutputChan0=4;
> ch2->OutputChan1=5;
> ch2->LimitSwitchOptions=0x0;
> ch2->InputGain0=1.000000;
> ch2->InputGain1=1.000000;
> ch2->InputOffset0=0.000000;
> ch2->InputOffset1=0.000000;
> ch2->invDistPerCycle=1.000000;
> ch2->Lead=0.000000;
> ch2->MaxFollowingError=1000000000.000000;
> ch2->StepperAmplitude=250.000000;
>
> ch2->iir[0].B0=1.000000;
> ch2->iir[0].B1=0.000000;
> ch2->iir[0].B2=0.000000;
> ch2->iir[0].A1=0.000000;
> ch2->iir[0].A2=0.000000;
>
> ch2->iir[1].B0=1.000000;
> ch2->iir[1].B1=0.000000;
> ch2->iir[1].B2=0.000000;
> ch2->iir[1].A1=0.000000;
> ch2->iir[1].A2=0.000000;
>
> ch2->iir[2].B0=1.000000;
> ch2->iir[2].B1=0.000000;
> ch2->iir[2].B2=0.000000;
> ch2->iir[2].A1=0.000000;
> ch2->iir[2].A2=0.000000;*/
>
> EnableAxisDest(2,0);
>
> DefineCoordSystem(0,1,2,-1);
>
> return 0;
>
> --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Rick,
> >  
> > I'm not sure I follow all that.  Maybe you might post your files.  If anything configures the Step/Dir generators or IO on JP7 then Kanalog will probably stop functioning.  Does the charge pump LED on Kanalog go off when you enable the axis?
> >  
> >  
> > Regards
> > TK
> >
> > From: rdabs54 <rdabney@>
> > To: mailto:DynoMotion%40yahoogroups.com
> > Sent: Sunday, September 9, 2012 6:45 PM
> > Subject: [DynoMotion] opto inputs inop with mach
> >
> >
> >  
> > Greetings. I'm trying to finish setting up Kflop and Kanalog with Mach. I asked this question once before, but got on to other projects. This is a little more specific.
> > Build 427
> > What works: Three Geckos properly drive servos on a Bridgeport, three axis, CL with glass scales. (more on that in a different post). MUX bit set so step/dir goes to JP4 and 6, and placed at the beginning of the code. I can jog from Mach or Kmotion, with exceptions below.
> > Before loading C file, Kanalog reads the switches on opto in 142 and 143 fine. After loading C file, but before enabling axis (done manually, axis enable remarked out), kanalog continues to read opto state as well as mach (input config set at port 2, pin 14 and 15). When axis enabled, switch indication ceases on Mach and Kanalog. Also, Axis (1) will estop within a few hundred steps. Sometimes impossible to reset unless I run a step/response check (works fine). Then I can reset. I changed the estop bit in mach to 30 (unused), then it works fine, though no switch is yet connected to 30.
> > The C file is pretty much what is supplied as an example, with only the parameters changed for the step/dir operation.
> > I tried several iteration of the code, but setting MUX bit always kills opto inputs, and lets step/dir work. I really want to use the opto inputs on the board so I don't have to build another opto interface.
> > I'm using Mach 3.043.022, Windows 7 professional, no bloatware. Mach and Kmotion reinstalled twice. Kflop/Kanalog powered by good quality 5V 2A linear supply.
> > I'm stuck. Help, Please.
> >
> > Thanks in Advance,
> >
> > rick
> >
>
Group: DynoMotion Message: 5652 From: Tom Kerekes Date: 9/11/2012
Subject: Re: opto inputs inop with mach
Hi Rick,
 
Yes I can re-produce the problem.  Enabling Axis 1 (Step Dir Gen #1) kills Kanalog Communication (LED goes out).
 
Please give me some time to figure out what is going on.
 
Thanks for the clear problem description and example.
 
Regards
TK 

Group: DynoMotion Message: 5653 From: Tom Kerekes Date: 9/11/2012
Subject: Re: opto inputs inop with mach
Hi Rick,
 
 
We found a bug where the tri-state control (open collector) mode was not being mux'ed properly from JP7 to JP4 and JP6.
 
 
 
Because JP4 and JP6 have pull down resistors it is not possible to use open collector mode on those connectors (actually Step/Dir Gen #1 and #3 are on pins without pull downs so those will work in open collector mode).  Your configuration was selecting channels 0,1,2 which are open collector modes.  However due to the bug they were working ok for you in TTL mode.  Now that the bug has been corrected you will need to specify OutputChan 8,9,10 
 
Please download our latest Test Version KMotion430c
 
 
Then patch it by copying this Fixed firmware to the DSP_KFLOP subdirectory and FLASH it to the board using the Config/FLASH New Version command.
 
 
Please let us know if it resolves the problem.
 
Regards
TK
 
 
Group: DynoMotion Message: 5665 From: rdabs54 Date: 9/13/2012
Subject: Re: opto inputs inop with mach
Hi Tom,

The patch appears to work perfectly. Many thanks for the help. I hope not to pioneer any further problems.
I'll post a synopsis of the CNC conversion when I complete it. I'll certainly highlight your help, along with the various missteps I managed to work through.
I couldn't have done it without your help.

Rick

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Rick,
>  
>  
> We found a bug where the tri-state control (open collector) mode was not being mux'ed properly from JP7 to JP4 and JP6.
>  
>  
>  
> Because JP4 and JP6 have pull down resistors it is not possible to use open collector mode on those connectors (actually Step/Dir Gen #1 and #3 are on pins without pull downs so those will work in open collector mode).  Your configuration was selecting channels 0,1,2 which are open collector modes.  However due to the bug they were working ok for you in TTL mode.  Now that the bug has been corrected you will need to specify OutputChan 8,9,10.  
>  
> Please download our latest Test Version KMotion430c
>  
> http://www.dynomotion.com/Software/KMotion430c.exe
>  
> Then patch it by copying this Fixed firmware to the DSP_KFLOP subdirectory and FLASH it to the board using the Config/FLASH New Version command.
>  
> http://www.dynomotion.com/Software/Patch/FixMuxStepDirWithKanalog/DSPKFLOP.out
>  
> Please let us know if it resolves the problem.
>  
> Regards
> TK
>  
>  
> From: rdabs54 <rdabney@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, September 11, 2012 8:37 AM
> Subject: [DynoMotion] Re: opto inputs inop with mach
>
>
>  
> Hi Tom,
>
> My follow up question: When I upload the program below with the exception of enabling the axis, mach and Kanalog digital I/O screen sees the switches I have wired into opto 6 and 7 (bit 142 and 143). The state of the switches are accurately noted on the appropriate screens. (Mach ports and pins set to port 2, pin 14 and 15, per Dynomotion manual). As soon as I enable the axis, either within the program or from dynomotion axis enable axis menu, they no longer read input state. The axis will jog and run.
> Thanks for your effort to help me.
>
> Rick
>
> --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Rick,
> >  
> > No Problem I'm just trying to undersatnd.
> >  
> > Yes the Kanalog IOs should still be usable with Step/Dir coming out JP4 anf JP6.
> >  
> > regards
> > TK
> >
> > From: rdabs54 <rdabney@>
> > To: mailto:DynoMotion%40yahoogroups.com
> > Sent: Monday, September 10, 2012 8:43 PM
> > Subject: [DynoMotion] Re: opto inputs inop with mach
> >
> >
> >  
> > Apologies for the unintelligible question. Basically I am asking if the Kanalog opto I/O's are still useable with Mach3 when the MUX bit is set to send the step/dir 0 through 3 to JP4 and JP6 to run my Geckodrives. Mach "sees" them until I enable the axis. I'll expand on the question based on your answer. Attached is the test C program I am using.
> > Thanks for the help.
> >
> > Rick
> >
> > #include "KMotionDef.h"
> >
> > // Defines axis 0 and 1 as simple steppers
> > // enables them
> > // sets them as an xy coordinate system for GCode
> >
> > int main()
> > {
> > FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x40;
> >
> > ch0->InputMode=ENCODER_MODE;
> > ch0->OutputMode=CL_STEP_DIR_MODE;
> > ch0->Vel=66000;
> > ch0->Accel=15259;
> > ch0->Jerk=6.6e+006;
> > ch0->P=0;
> > ch0->I=0;
> > ch0->D=0;
> > ch0->FFAccel=0;
> > ch0->FFVel=0;
> > ch0->MaxI=200;
> > ch0->MaxErr=200;
> > ch0->MaxOutput=200;
> > ch0->DeadBandGain=1;
> > ch0->DeadBandRange=0;
> > ch0->InputChan0=0;
> > ch0->InputChan1=1;
> > ch0->OutputChan0=0;
> > ch0->OutputChan1=1;
> > ch0->MasterAxis=-1;
> > ch0->LimitSwitchOptions=0x8f0024;
> > ch0->InputGain0=-3;
> > ch0->InputGain1=1;
> > ch0->InputOffset0=0;
> > ch0->InputOffset1=0;
> > ch0->OutputGain=-1;
> > ch0->OutputOffset=0;
> > ch0->SlaveGain=1;
> > ch0->BacklashMode=BACKLASH_OFF;
> > ch0->BacklashAmount=0;
> > ch0->BacklashRate=0;
> > ch0->invDistPerCycle=1;
> > ch0->Lead=0;
> > ch0->MaxFollowingError=1000000000;
> > ch0->StepperAmplitude=250;
> >
> > ch0->iir[0].B0=1;
> > ch0->iir[0].B1=0;
> > ch0->iir[0].B2=0;
> > ch0->iir[0].A1=0;
> > ch0->iir[0].A2=0;
> >
> > ch0->iir[1].B0=1;
> > ch0->iir[1].B1=0;
> > ch0->iir[1].B2=0;
> > ch0->iir[1].A1=0;
> > ch0->iir[1].A2=0;
> >
> > ch0->iir[2].B0=1;
> > ch0->iir[2].B1=0;
> > ch0->iir[2].B2=0;
> > ch0->iir[2].A1=0;
> > ch0->iir[2].A2=0;
> >
> > /*ch0->InputMode=ENCODER_MODE;
> > ch0->OutputMode=STEP_DIR_MODE;
> > ch0->Vel= 66000.000000;
> > ch0->Accel=660000.000000;
> > ch0->Jerk=6600000.000000;
> > ch0->P=1.000000;
> > ch0->I=0.000000;
> > ch0->D=0.000000;
> > ch0->FFAccel=0.000000;
> > ch0->FFVel=0.000000;
> > ch0->MaxI=200.000000;
> > ch0->MaxErr=200.000000;
> > ch0->MaxOutput=200.000000;
> > ch0->DeadBandGain=1.000000;
> > ch0->DeadBandRange=0.000000;
> > ch0->InputChan0=0;
> > ch0->InputChan1=1;
> > ch0->OutputChan0=0;
> > ch0->OutputChan1=1;
> > ch0->LimitSwitchOptions=0x0;
> > ch0->InputGain0=1.000000;
> > ch0->InputGain1=1.000000;
> > ch0->InputOffset0=0.000000;
> > ch0->InputOffset1=0.000000;
> > ch0->invDistPerCycle=1.000000;
> > ch0->Lead=0.000000;
> > ch0->MaxFollowingError=1000000000.000000;
> > ch0->StepperAmplitude=250.000000;
> >
> > ch0->iir[0].B0=1.000000;
> > ch0->iir[0].B1=0.000000;
> > ch0->iir[0].B2=0.000000;
> > ch0->iir[0].A1=0.000000;
> > ch0->iir[0].A2=0.000000;
> >
> > ch0->iir[1].B0=1.000000;
> > ch0->iir[1].B1=0.000000;
> > ch0->iir[1].B2=0.000000;
> > ch0->iir[1].A1=0.000000;
> > ch0->iir[1].A2=0.000000;
> >
> > ch0->iir[2].B0=1.000000;
> > ch0->iir[2].B1=0.000000;
> > ch0->iir[2].B2=0.000000;
> > ch0->iir[2].A1=0.000000;
> > ch0->iir[2].A2=0.000000;
> > EnableAxisDest(0,0);*/
> >
> > ch1->InputMode=ENCODER_MODE;
> > ch1->OutputMode=CL_STEP_DIR_MODE;
> > ch1->Vel=66000;
> > ch1->Accel=15259;
> > ch1->Jerk=6.6e+006;
> > ch1->P=0;
> > ch1->I=0;
> > ch1->D=0;
> > ch1->FFAccel=0;
> > ch1->FFVel=0;
> > ch1->MaxI=200;
> > ch1->MaxErr=20000;
> > ch1->MaxOutput=200;
> > ch1->DeadBandGain=1;
> > ch1->DeadBandRange=0;
> > ch1->InputChan0=1;
> > ch1->InputChan1=2;
> > ch1->OutputChan0=1;
> > ch1->OutputChan1=1;
> > ch1->MasterAxis=-1;
> > ch1->LimitSwitchOptions=0x0;
> > ch1->InputGain0=3;
> > ch1->InputGain1=1;
> > ch1->InputOffset0=0;
> > ch1->InputOffset1=0;
> > ch1->OutputGain=1;
> > ch1->OutputOffset=0;
> > ch1->SlaveGain=1;
> > ch1->BacklashMode=BACKLASH_OFF;
> > ch1->BacklashAmount=0;
> > ch1->BacklashRate=0;
> > ch1->invDistPerCycle=1;
> > ch1->Lead=0;
> > ch1->MaxFollowingError=1000000000;
> > ch1->StepperAmplitude=250;
> >
> > ch1->iir[0].B0=1;
> > ch1->iir[0].B1=0;
> > ch1->iir[0].B2=0;
> > ch1->iir[0].A1=0;
> > ch1->iir[0].A2=0;
> >
> > ch1->iir[1].B0=1;
> > ch1->iir[1].B1=0;
> > ch1->iir[1].B2=0;
> > ch1->iir[1].A1=0;
> > ch1->iir[1].A2=0;
> >
> > ch1->iir[2].B0=1;
> > ch1->iir[2].B1=0;
> > ch1->iir[2].B2=0;
> > ch1->iir[2].A1=0;
> > ch1->iir[2].A2=0;
> >
> > /*ch1->InputMode=ENCODER_MODE;
> > ch1->OutputMode=CL_STEP_DIR_MODE;
> > ch1->Vel=100.000000;
> > ch1->Accel=1000.000000;
> > ch1->Jerk=10000.000000;
> > ch1->P=0.000000;
> > ch1->I=0.000000;
> > ch1->D=0.000000;
> > ch1->FFAccel=0.000000;
> > ch1->FFVel=0.000000;
> > ch1->MaxI=200.000000;
> > ch1->MaxErr=200.000000;
> > ch1->MaxOutput=200.000000;
> > ch1->DeadBandGain=1.000000;
> > ch1->DeadBandRange=0.000000;
> > ch1->InputChan0=1;
> > ch1->InputChan1=2;
> > ch1->OutputChan0=2;
> > ch1->OutputChan1=3;
> > ch1->LimitSwitchOptions=0x0;
> > ch1->InputGain0=1.000000;
> > ch1->InputGain1=1.000000;
> > ch1->InputOffset0=0.000000;
> > ch1->InputOffset1=0.000000;
> > ch1->invDistPerCycle=1.000000;
> > ch1->Lead=0.000000;
> > ch1->MaxFollowingError=1000000000.000000;
> > ch1->StepperAmplitude=250.000000;
> >
> > ch1->iir[0].B0=1.000000;
> > ch1->iir[0].B1=0.000000;
> > ch1->iir[0].B2=0.000000;
> > ch1->iir[0].A1=0.000000;
> > ch1->iir[0].A2=0.000000;
> >
> > ch1->iir[1].B0=1.000000;
> > ch1->iir[1].B1=0.000000;
> > ch1->iir[1].B2=0.000000;
> > ch1->iir[1].A1=0.000000;
> > ch1->iir[1].A2=0.000000;
> >
> > ch1->iir[2].B0=1.000000;
> > ch1->iir[2].B1=0.000000;
> > ch1->iir[2].B2=0.000000;
> > ch1->iir[2].A1=0.000000;
> > ch1->iir[2].A2=0.000000;*/
> > EnableAxisDest(1,0);
> >
> > ch2->InputMode=ENCODER_MODE;
> > ch2->OutputMode=CL_STEP_DIR_MODE;
> > ch2->Vel=4000;
> > ch2->Accel=4000;
> > ch2->Jerk=4e+006;
> > ch2->P=0;
> > ch2->I=0;
> > ch2->D=0;
> > ch2->FFAccel=0;
> > ch2->FFVel=0;
> > ch2->MaxI=200;
> > ch2->MaxErr=1e+006;
> > ch2->MaxOutput=200;
> > ch2->DeadBandGain=1;
> > ch2->DeadBandRange=0;
> > ch2->InputChan0=2;
> > ch2->InputChan1=0;
> > ch2->OutputChan0=2;
> > ch2->OutputChan1=0;
> > ch2->MasterAxis=-1;
> > ch2->LimitSwitchOptions=0x0;
> > ch2->InputGain0=-1;
> > ch2->InputGain1=1;
> > ch2->InputOffset0=0;
> > ch2->InputOffset1=0;
> > ch2->OutputGain=-1;
> > ch2->OutputOffset=0;
> > ch2->SlaveGain=1;
> > ch2->BacklashMode=BACKLASH_OFF;
> > ch2->BacklashAmount=0;
> > ch2->BacklashRate=0;
> > ch2->invDistPerCycle=1;
> > ch2->Lead=0;
> > ch2->MaxFollowingError=1000000000;
> > ch2->StepperAmplitude=20;
> >
> > ch2->iir[0].B0=1;
> > ch2->iir[0].B1=0;
> > ch2->iir[0].B2=0;
> > ch2->iir[0].A1=0;
> > ch2->iir[0].A2=0;
> >
> > ch2->iir[1].B0=1;
> > ch2->iir[1].B1=0;
> > ch2->iir[1].B2=0;
> > ch2->iir[1].A1=0;
> > ch2->iir[1].A2=0;
> >
> > ch2->iir[2].B0=0.000769;
> > ch2->iir[2].B1=0.001538;
> > ch2->iir[2].B2=0.000769;
> > ch2->iir[2].A1=1.92081;
> > ch2->iir[2].A2=-0.923885;
> >
> >
> > /*ch2->InputMode=ENCODER_MODE;
> > ch2->OutputMode=MICROSTEP_MODE;
> > ch2->Vel=100.000000;
> > ch2->Accel=1000.000000;
> > ch2->Jerk=10000.000000;
> > ch2->P=1.000000;
> > ch2->I=0.000000;
> > ch2->D=0.000000;
> > ch2->FFAccel=0.000000;
> > ch2->FFVel=0.000000;
> > ch2->MaxI=200.000000;
> > ch2->MaxErr=200.000000;
> > ch2->MaxOutput=200.000000;
> > ch2->DeadBandGain=1.000000;
> > ch2->DeadBandRange=0.000000;
> > ch2->InputChan0=2;
> > ch2->InputChan1=3;
> > ch2->OutputChan0=4;
> > ch2->OutputChan1=5;
> > ch2->LimitSwitchOptions=0x0;
> > ch2->InputGain0=1.000000;
> > ch2->InputGain1=1.000000;
> > ch2->InputOffset0=0.000000;
> > ch2->InputOffset1=0.000000;
> > ch2->invDistPerCycle=1.000000;
> > ch2->Lead=0.000000;
> > ch2->MaxFollowingError=1000000000.000000;
> > ch2->StepperAmplitude=250.000000;
> >
> > ch2->iir[0].B0=1.000000;
> > ch2->iir[0].B1=0.000000;
> > ch2->iir[0].B2=0.000000;
> > ch2->iir[0].A1=0.000000;
> > ch2->iir[0].A2=0.000000;
> >
> > ch2->iir[1].B0=1.000000;
> > ch2->iir[1].B1=0.000000;
> > ch2->iir[1].B2=0.000000;
> > ch2->iir[1].A1=0.000000;
> > ch2->iir[1].A2=0.000000;
> >
> > ch2->iir[2].B0=1.000000;
> > ch2->iir[2].B1=0.000000;
> > ch2->iir[2].B2=0.000000;
> > ch2->iir[2].A1=0.000000;
> > ch2->iir[2].A2=0.000000;*/
> >
> > EnableAxisDest(2,0);
> >
> > DefineCoordSystem(0,1,2,-1);
> >
> > return 0;
> >
> > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Rick,
> > >  
> > > I'm not sure I follow all that.  Maybe you might post your files.  If anything configures the Step/Dir generators or IO on JP7 then Kanalog will probably stop functioning.  Does the charge pump LED on Kanalog go off when you enable the axis?
> > >  
> > >  
> > > Regards
> > > TK
> > >
> > > From: rdabs54 <rdabney@>
> > > To: mailto:DynoMotion%40yahoogroups.com
> > > Sent: Sunday, September 9, 2012 6:45 PM
> > > Subject: [DynoMotion] opto inputs inop with mach
> > >
> > >
> > >  
> > > Greetings. I'm trying to finish setting up Kflop and Kanalog with Mach. I asked this question once before, but got on to other projects. This is a little more specific.
> > > Build 427
> > > What works: Three Geckos properly drive servos on a Bridgeport, three axis, CL with glass scales. (more on that in a different post). MUX bit set so step/dir goes to JP4 and 6, and placed at the beginning of the code. I can jog from Mach or Kmotion, with exceptions below.
> > > Before loading C file, Kanalog reads the switches on opto in 142 and 143 fine. After loading C file, but before enabling axis (done manually, axis enable remarked out), kanalog continues to read opto state as well as mach (input config set at port 2, pin 14 and 15). When axis enabled, switch indication ceases on Mach and Kanalog. Also, Axis (1) will estop within a few hundred steps. Sometimes impossible to reset unless I run a step/response check (works fine). Then I can reset. I changed the estop bit in mach to 30 (unused), then it works fine, though no switch is yet connected to 30.
> > > The C file is pretty much what is supplied as an example, with only the parameters changed for the step/dir operation.
> > > I tried several iteration of the code, but setting MUX bit always kills opto inputs, and lets step/dir work. I really want to use the opto inputs on the board so I don't have to build another opto interface.
> > > I'm using Mach 3.043.022, Windows 7 professional, no bloatware. Mach and Kmotion reinstalled twice. Kflop/Kanalog powered by good quality 5V 2A linear supply.
> > > I'm stuck. Help, Please.
> > >
> > > Thanks in Advance,
> > >
> > > rick
> > >
> >
>